package com.mpgame.core.status;

import com.fasterxml.jackson.databind.JsonNode;
import com.mpgame.core.model.Damage;
import com.mpgame.core.model.DamageType;
import com.mpgame.core.model.Monster;

public class BurnStatus extends StatusBase{
    public BurnStatus(){
        super(StatusType.BURN, 0);
    }
    @Override
    protected void parseJson(JsonNode params){
        this.setRoundDuration(params.get("roundDuration").asInt());
    }
    @Override
    protected void Take(Monster mOwner, Monster mOpponent){
        // 烧伤，减少最大生命值的1/8
        mOwner.takeHurt(new Damage(DamageType.FIXED, mOwner.getHealth() / 8));
    }
}
